import Vue from 'vue'
import Router from 'vue-router'
import Admin from '@/views/admin/admin'
import AdminLogin from '@/views/admin/login'
import Own from '@/views/admin/own'
// concert
import Concert from '@/views/admin/concert/concert'
import ConcertList from '@/views/admin/concert/list'
// goods
import Goods from '@/views/admin/goods/goods'
import GoodsList from '@/views/admin/goods/list'
// Seat
import Seat from '@/views/admin/seat/seat'
import SeatList from '@/views/admin/seat/list'
// manager
import Rule from '@/views/admin/manager/rule'
import Role from '@/views/admin/manager/role'
import Manager from '@/views/admin/manager/list'
import Log from '@/views/admin/manager/log'
// customer
import Customer from '@/views/admin/customer/list';
import Group from '@/views/admin/customer/group';
// others
import Carousel from '@/views/admin/others/carousel'
import Class from '@/views/admin/others/classification'
import Comments from '@/views/admin/others/comments'
import Sells from '@/views/admin/others/sells'
// Index
import Index from '@/views/index/index'
import Content from '@/views/index/content'
import List from '@/views/index/list'
import GoodsL from '@/views/index/goodsL'
import GoodsD from '@/views/index/goodsD'
import Login from '@/views/index/login'
import Pay from '@/views/index/pay'
import User from '@/views/index/user'
// error
import Error403 from "@/views/error-page/403.vue";
import Error404 from "@/views/error-page/404.vue";
import Error500 from "@/views/error-page/500.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/content/:id',
      name: 'Content',
      component: Content
    },
    {
      path: '/goods',
      name: 'GoodsL',
      component: GoodsL
    },
    {
      path: '/goods/:id',
      name: 'GoodsD',
      component: GoodsD
    },
    {
      path: '/list/:type',
      name: 'List',
      component: List
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/pay/type/:type/itemId/:id',
      name: 'Pay',
      component: Pay
    },
    {
      path: '/user',
      name: 'User',
      component: User
    },
    {
      path: '/admin_login',
      name: 'AdminLogin',
      component: AdminLogin
    },
    {
      path: '/admin',
      name: 'Admin',
      component: Admin,
      children: [
        {
          path: 'own',
          component: Own,
        },
        {
          path: 'concert/:id',
          component: Concert,
        },
        {
          path: 'concert',
          component: ConcertList,
        },
        {
          path: 'goods/:id',
          component: Goods,
        },
        {
          path: 'goods',
          component: GoodsList,
        },
        {
          path: 'seat/:id',
          component: Seat,
        },
        {
          path: 'seat',
          component: SeatList,
        },
        {
          path: 'role',
          component: Role,
        },
        {
          path: 'rule',
          component: Rule,
        },
        {
          path: 'manager',
          component: Manager,
        },
        {
          path: 'log',
          component: Log,
        },
        {
          path: 'carousel',
          component: Carousel,
        },
        {
          path: 'class',
          component: Class,
        },
        {
          path: 'comments',
          component: Comments,
        },
        {
          path: 'sells',
          component: Sells,
        },
        {
          path: 'customer',
          component: Customer,
        },
        {
          path: 'group',
          component: Group,
        }
      ]
    },
    {
      path: '/404',
      name: 'Error404',
      component: Error404
    },
    {
      path: '/403',
      name: 'Error403',
      component: Error403
    },
    {
      path: '/500',
      name: 'Error500',
      component: Error500
    },
  ]
})
